#!/usr/bin/env python
# -*- coding: utf-8 -*-
from app import create_app
from backend.models.role import Role

app = create_app()
with app.app_context():
    roles = Role.query.all()
    print(f"系统中的角色 ({len(roles)} 个):")
    for role in roles:
        perm_count = len(list(role.permissions))
        print(f"  - ID: {role.id}, Name: '{role.name}', 权限数: {perm_count}")
